package com.youlai.boot.system.service;

import com.youlai.boot.system.model.entity.LpsOrder;
import com.youlai.boot.system.model.form.LpsOrderForm;
import com.youlai.boot.system.model.query.LpsOrderQuery;
import com.youlai.boot.system.model.vo.LpsOrderImportExcelResultVO;
import com.youlai.boot.system.model.vo.LpsOrderNODownloadVO;
import com.youlai.boot.system.model.vo.LpsOrderVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Set;

/**
 * 莱普森订单服务类
 *
 * @author lwb
 * @since 2025-07-13 16:00
 */
public interface LpsOrderService extends IService<LpsOrder> {

    /**
     * 莱普森订单分页列表
     *
     * @return
     */
    IPage<LpsOrderVO> getLpsOrderPage(LpsOrderQuery queryParams);

    /**
     * 获取莱普森订单表单数据
     *
     * @param id 莱普森订单ID
     * @return
     */
    LpsOrderForm getLpsOrderFormData(Long id);

    /**
     * 新增莱普森订单
     *
     * @param formData 莱普森订单表单对象
     * @return
     */
    boolean saveLpsOrder(LpsOrderForm formData);

    /**
     * 修改莱普森订单
     *
     * @param id       莱普森订单ID
     * @param formData 莱普森订单表单对象
     * @return
     */
    boolean updateLpsOrder(Long id, LpsOrderForm formData);

    /**
     * 删除莱普森订单
     *
     * @param ids 莱普森订单ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deleteLpsOrders(String ids);

    /**
     * 导入订单后的处理结果
     *
     * @param files
     * @return
     */
    LpsOrderImportExcelResultVO importExcel(List<MultipartFile> files) throws Exception;

    /**
     * 下载
     *
     * @param queryParams
     * @param response
     */
    void download(LpsOrderQuery queryParams, HttpServletResponse response) throws Exception;

    /**
     *
     * @param userNames
     * @return
     */
    List<LpsOrderNODownloadVO> getNoDownloadUserList(Set<String> userNames);

    /**
     *
     * @param userNames
     * @return
     */
    LpsOrderNODownloadVO getNoDownloadUser(String userNames);
}
